//
//  OnlineUserView.swift
//  XCDragCardContainer_Example
//
//  Created by edy on 2023/5/29.
//  Copyright © 2023 CocoaPods. All rights reserved.
//

import UIKit
import XCDragCardContainer

class OnlineUserView: DragCardView {
    
    var chatActionBlock: (() -> Void)?

    @IBOutlet weak var userAvatarImagView: UIImageView!
    
    @IBOutlet weak var userNameLabel: UILabel!
    
    @IBOutlet weak var cionsImageView: UIImageView!
    
    @IBOutlet weak var cionsWide: NSLayoutConstraint!
    
    @IBOutlet weak var countryIcon: UILabel!
    
    @IBOutlet weak var ageLabel: UILabel!
    
    @IBOutlet weak var userInfoLabel: UILabel!
    
    @IBOutlet weak var clickBtnView: UIView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
    }
        
    @IBAction func sayHiAction(_ sender: Any) {
        print("aaaa")
        if let block = self.chatActionBlock {
            block()
        }
    }
    
}

extension OnlineUserView {
    class func show() -> OnlineUserView {
        let view = UINib(nibName: String(describing: OnlineUserView.self), bundle: nil).instantiate(withOwner: nil).first as! OnlineUserView
        return view
    }
}
